 <div class="container">
        <div class="row">
            <div class="col-md-8 col-md-offset-2">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3>Post ad</h3>
                    </div>
                    <div class="panel-body">
                        <form action="  <?php echo site_url('members/create_new_ad'); ?>" method="post"  enctype="multipart/form-data">
                            <div>
                                <label>
                                Ad Title:
                                <input name="title" required="required"  class="form-control" type="text">
                                </label><br>
                                
                                <label>
                                Category:
                                    <select name="cat" class="form-control">
                                        <?php 
                                        foreach($records as $row)
                                            echo "<option value='".$row->cat_id."'>".$row->cat_name."</option>";                                        
                                        ?>
                                    </select>
                                </label><br>
                                
                                <label>
                                Price:
                                <input name="price" required="required" placeholder="in pkr (type 0 for free)" class="form-control" type="text">
                                </label><br>
                                
                                <label>
                                Discription:
                                <textarea name="disc" required="required" placeholder="Breifly describe your item" style="width:180%; height:30%;" class="form-control"></textarea>
                                </label><br>
                                
                                <label>
                                Image 1 (Main Img):
                                <input style="width:50%; margin:20px;" type="file" size="20" name="img1">
                                </label>
                                
                                <label>
                                Image 2:
                                <input style="width:50%; margin:20px;" type="file" size="20" name="img2">
                                </label>
                                
                                <label>
                                Image 3:
                                <input style="width:50%; margin:20px;" type="file" size="20" name="img3">
                                </label><br><br>
                                
                                <label>
                                    keywords:
                                    <textarea name="keywords" required="required" placeholder="Write words which will help users find your item eg: mobile cheap mint condition" style="width:180%; height:30%;" class="form-control" ></textarea>
                                </label><br>
                                
                                <label>
                                    Contact No:
                                    <input name="contact" required="required" type="text" class="form-control">
                                </label><br>
                                
                                <center>
                                    <input type="submit" value="post" class="btn btn-primary">
                                </center>
                            </form>   
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>